module.exports = {
    /**
     * session缓存当前登录人信息
     */
    setCookie: function (req, res) {
        // TODO:
        res.createSuccess();
    },

    /**
     * 清除session对当前登录人的缓存
     */
    clearCookie: function (req, res) {
        // TODO:
        req.session.destroy();
        res.createSuccess();
    },

    /**
     * 获取账户信息
     */
    getAccount: function (req, res) {
        var account = req.session.account;
        res.createSuccess({
            accountId: account.accountId,
            accountName: account.accountName,
            imgUrl: account.imgUrl,
            stopService: !!account.stopService
        });
    }
};
